using System;

namespace JGSY.CMS.LowCode.Platform.Application.DTOs
{
    /// <summary>
    /// 模板数据传输对象
    /// 用于页面模板和邮件模板的数据传输
    /// </summary>
    public class TemplateDto
    {
        /// <summary>
        /// 模板ID
        /// </summary>
        public long Id { get; set; }
        
        /// <summary>
        /// 模板名称
        /// </summary>
        public string Name { get; set; } = string.Empty;
        
        /// <summary>
        /// 模板描述
        /// </summary>
        public string? Description { get; set; }
        
        /// <summary>
        /// 模板类型 (page, email, sms, push)
        /// </summary>
        public string Type { get; set; } = string.Empty;
        
        /// <summary>
        /// 模板分类
        /// </summary>
        public string? Category { get; set; }
        
        /// <summary>
        /// 模板内容
        /// </summary>
        public string Content { get; set; } = string.Empty;
        
        /// <summary>
        /// 模板变量 (JSON格式，定义可用变量和默认值)
        /// </summary>
        public string? Variables { get; set; }
        
        /// <summary>
        /// 模板样式 (CSS)
        /// </summary>
        public string? Styles { get; set; }
        
        /// <summary>
        /// 模板脚本 (JavaScript)
        /// </summary>
        public string? Scripts { get; set; }
        
        /// <summary>
        /// 模板配置 (JSON格式)
        /// </summary>
        public string? Configuration { get; set; }
        
        /// <summary>
        /// 预览图片URL
        /// </summary>
        public string? PreviewImage { get; set; }
        
        /// <summary>
        /// 缩略图URL
        /// </summary>
        public string? Thumbnail { get; set; }
        
        /// <summary>
        /// 模板引擎 (razor, handlebars, liquid等)
        /// </summary>
        public string Engine { get; set; } = "razor";
        
        /// <summary>
        /// 是否为系统模板
        /// </summary>
        public bool IsSystem { get; set; } = false;
        
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;
        
        /// <summary>
        /// 是否为默认模板
        /// </summary>
        public bool IsDefault { get; set; } = false;
        
        /// <summary>
        /// 使用次数
        /// </summary>
        public int UsageCount { get; set; } = 0;
        
        /// <summary>
        /// 排序权重
        /// </summary>
        public int SortWeight { get; set; } = 0;
        
        /// <summary>
        /// SEO标题
        /// </summary>
        public string? SeoTitle { get; set; }
        
        /// <summary>
        /// SEO关键词
        /// </summary>
        public string? SeoKeywords { get; set; }
        
        /// <summary>
        /// SEO描述
        /// </summary>
        public string? SeoDescription { get; set; }
        
        /// <summary>
        /// 自定义标签 (JSON格式)
        /// </summary>
        public string? Tags { get; set; }
        
        /// <summary>
        /// 版本号
        /// </summary>
        public string Version { get; set; } = "1.0.0";
        
        /// <summary>
        /// 状态
        /// </summary>
        public string Status { get; set; } = "Active";
        
        /// <summary>
        /// 创建者ID
        /// </summary>
        public Guid? CreatedById { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public string? CreatedByName { get; set; }
        
        /// <summary>
        /// 更新者ID
        /// </summary>
        public Guid? UpdatedById { get; set; }
        
        /// <summary>
        /// 更新者姓名
        /// </summary>
        public string? UpdatedByName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }
        
        /// <summary>
        /// 最后使用时间
        /// </summary>
        public DateTime? LastUsedAt { get; set; }
        
        /// <summary>
        /// 扩展属性 (JSON格式)
        /// </summary>
        public string? ExtendedProperties { get; set; }
    }
}
